package edu.bit.water.service;

import java.sql.SQLSyntaxErrorException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.stereotype.Service;

import edu.bit.water.dao.MetaEvaCtestSumAssociationDao;
import edu.bit.water.entity.MetaEvaCtestSum;

@Service
public class MetaEvaCtestSumAssociationService {

	@Autowired
	private MetaEvaCtestSumAssociationDao metaEvaCtestSumAssociationDao;
	
	/**
	 * 
	 * @param metaEvaCtestSum 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 * @throws BadSqlGrammarException
	 */
	public int insertMetaEvaCtestSumAssociation(MetaEvaCtestSum metaEvaCtestSum) throws BadSqlGrammarException{
		int n = metaEvaCtestSumAssociationDao.insertMetaEvaCtestSumAssociation(metaEvaCtestSum);
		return n;
	}

	public int updateMetaEvaCtestSumAssociation(MetaEvaCtestSum metaEvaCtestSum) throws BadSqlGrammarException{
		int n = metaEvaCtestSumAssociationDao.updateMetaEvaCtestSumAssociation(metaEvaCtestSum);
		return n;
	}

	
	/**
	 * 
	 * @param metaEvaCtestSum 元数据水平衡评估实体类
	 * @return 成功返回1，失败返回0
	 */
	public int deleteMetaEvaCtestSumAssociation(MetaEvaCtestSum metaEvaCtestSum) {
		int n = metaEvaCtestSumAssociationDao.deleteMetaEvaCtestSumAssociation(metaEvaCtestSum);
		return n;
	}
}
